﻿@model List<CourseSummaryModel>
@{
    IDictionary<int, int> member_count = ViewBag.MemberCountDic;
}



@functions {

    public string showStatus(int status)
    {
        if (status == 0)
        {
            return "未开始";
        }
        else if (status == 1)
        {
            return "进行中";
        }
        else if (status == 2)
        {
            return "完成";
        }
        else
        {
            return "未发布";
        }
    }
}

@for (int i = 0; i < Model.Count / 3 + 1; i++)
{

    <div class="row">
        @{
            var threes = Model.Skip((i % 3) * 3).Take(3);

            foreach (var item in threes)
            {
                if (item != null)
                {

                    <div class="col-xl-4">
                        <div class="card-box course-box">
                            <div class="dropdown float-right">
                                <button type="button" onclick="javascript:window.location.href='/Booking/Detail/@item.CourseId'" class="btn btn-danger btn-rounded mb-3">
                                    <i class="mdi mdi-eye-check"></i><span>  预定</span>
                                </button>
                            </div> <!-- end dropdown -->
                            <!-- Title-->

                            <h4 class="mt-0"><a href="javascript: void(0);" class="text-dark">@item.CourseTitle</a></h4>
                            <p class="text-muted text-uppercase"><i class="mdi mdi-subtitles-outline"></i> <small>@item.CourserSubTitle</small></p>

                            <!-- Desc-->
                            <div class="desc">

                                @Html.Raw(item.Description)  @*<a href="javascript:void(0);" class="font-weight-bold text-muted">更多...</a>*@

                            </div>
                            <div class="row mb-0">
                                <div class="col-1">
                                    <div class="avatar-group mb-0 mr-1 mt-1">
                                        <div class="dropdown float-left">
                                            <a href="/Teacher/Detail/@item.TeacherId" class="avatar-group-item" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="timmy">
                                                <img src="~/assets/images/users/user-1.jpg" width="100" height="100" class="rounded-circle avatar-sm" alt="@item.TeacherName" />
                                            </a>
                                        </div>

                                    </div>
                                </div>
                                <div class="col-11">
                                    <div class="ml-2 mt-1">
                                        <div>
                                            <span>@item.TeacherName</span>
                                        </div>
                                        <p class="text-muted font-11 mb-2 sp-line-3">
                                            @Html.Raw(item.TeacherTitle)  @*<a href="javascript:void(0);" class="font-weight-bold text-muted">更多...</a>*@
                                        </p>

                                    </div>
                                </div>
                            </div>
                            <!-- Team-->
                            <!-- Task info-->
                            <p class="mb-1 mt-1">
                                <span class="text-nowrap mb-2 d-inline-block">
                                    <i class="fa fa-user-alt text-muted"></i>
                                    <b>@item.StudentCount</b> 学员
                                </span>
                                <span class="text-nowrap mb-2 d-inline-block">
                                    <i class="mdi mdi-format-list-bulleted-type text-muted"></i>
                                    <b>@item.LessionCount</b> 课时
                                </span>
                                @*<span class="pr-2 text-nowrap mb-2 d-inline-block">
                                        <a href="javascript:window.location.href='/Booking/Detail/@item.CourseId'">
                                            <i class="mdi mdi-format-list-bulleted-type text-muted"></i>
                                            课时
                                        </a>

                                    </span>*@

                                <span class="text-nowrap mb-2 d-inline-block">
                                    <i class="mdi mdi-comment-multiple-outline text-muted"></i>
                                    <b>@item.EvulationCount</b> 评论
                                </span>
                            </p>

                            <!-- Progress-->
                        </div> <!-- end card box-->
                    </div><!-- end col-->
                }
            }

        }
    </div>
    <!-- end row -->
}
